home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib43 / mntlib / abort.c < prev    next >
C/C++ Source or Header  |  1993-10-28  |  544b  |  36 lines

  1. /* ERS */
  2.  
  3. #include <signal.h>
  4. #include <stdlib.h>
  5. #include <unistd.h>
  6. #include <mintbind.h>
  7. #include "lib.h"
  8.  
  9. #ifndef SIGABRT
  10. #define SIGABRT SIGIOT
  11. #endif
  12.  
  13. extern int __mint;
  14.  
  15. __EXITING
  16. abort()
  17. {
  18. #ifdef __MINT__
  19.     if (__mint)
  20.         (void) Pkill(Pgetpid(), SIGABRT);
  21. #if 0
  22.     /* Do not do this because it violates POSIX (raise() and
  23.        kill() are available for the user unless <signal.h> is
  24.        included in user's source).  Fix later.
  25.     */
  26.     else
  27.         raise(SIGABRT);
  28. #endif
  29.     _fclose_all_files();
  30.     _exit(127);
  31. #else
  32.     raise(SIGABRT);
  33.     exit(127);
  34. #endif
  35. }
  36.